home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garden Fax: Indoor Plants
/
Garden Fax - Indoor Plants (1991)(CDTV Publishing)[!].iso
/
system
/
basicdemos
/
screen
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1991-04-17
|
1KB
|
65 lines
REM --- Screen - Amiga BASIC Graphics demo --- 20-July-85
DEFINT A-Z
IF FRE(-1)<60000 THEN
PRINT "Sorry, this demo requires a
PRINT "machine with 512k of memory
END
END IF
SCREEN 1,320,200,5,1
WINDOW 2,"Lines",(10,10)-(270,170),15,1
PALETTE 1,0,0,1
PALETTE 2,0,1,0
DIM Pattern0%(3)
DIM Pattern1%(3)
DIM Pattern2%(3)
FOR I=0 TO 3
READ Pattern0%(I)
READ Pattern1%(I)
READ Pattern2%(I)
NEXT I
DATA &HAAAA, &H3333, &HFFFF
DATA &H5555, &H3333, &HFFFF
DATA &HAAAA, &H3333, &HFFFF
DATA &H5555, &H3333, &HFFFF
WHILE 1
CLS
GetWindowDim winWidth, winHeight
FOR I=1 TO 8
iPat=RND*3
IF iPat=0 THEN
PATTERN -1,Pattern0%
ELSEIF iPat=1 THEN
PATTERN -1,Pattern1%
ELSEIF iPat=2 THEN
PATTERN -1,Pattern2%
END IF
color1 = 2*I+2
color2 = color1+1
PALETTE color1,RND,RND,RND
PALETTE color2,RND,RND,RND
COLOR color1,color2
x = winWidth/2
y = winHeight/2
cosI! = (9-I)*0.1*COS(I)
sinI! = (9-I)*0.1*SIN(I)
XcosI = x*cosI!
XsinI = x*sinI!
YcosI = y*cosI!
YsinI = y*sinI!
AREA (x+XcosI,y+YsinI)
AREA (x+XsinI,y-YcosI)
AREA (x-XcosI,y-YsinI)
AREA (x-XsinI,y+YcosI)
AREAFILL
NEXT I
WEND
SUB GetWindowDim(winWidth, winHeight) STATIC
winWidth = WINDOW(2)
winHeight = WINDOW(3)
END SUB